import random
n = 0
for i in range(10000000):
	x = random.uniform(0, 1)
	y = random.uniform(0, 1)
	
	if x*2 + y*2 <=1:
		n += 1
		
pi = 4 * n / 10000000
print(pi)
